package com.cimpm.permission.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.hby.common.annotation.entity.Primary;
import com.hby.common.annotation.entity.Secondary;
import com.hby.common.annotation.entity.VerifyMultiRepetitionField;

import java.util.Date;

@TableName("permission_user_organization_mapper")
public class UserOrganizationMapper {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Primary
    @VerifyMultiRepetitionField
    private Integer userId;

    @Secondary
    @VerifyMultiRepetitionField
    private Integer organizationId;

    @TableLogic
    private Date isDeleted;

    @Version
    private Integer version;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(Integer organizationId) {
        this.organizationId = organizationId;
    }

    public Date getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Date isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return "UserOrganizationMapper{" + "id=" + id + ", userId=" + userId + ", organizationId=" + organizationId + ", isDeleted=" + isDeleted + ", version=" + version + '}';
    }
}
